﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TruongVu.Data;

namespace TruongVu.Business
{
    public class Support
    {
        public string GetYahooSupport()
        {
            var query = from s in Singleton.DataContext.SuportOnlines
                      select s;

            StringBuilder res = new StringBuilder();
            res.Append("<table width=\"100%\">");

            foreach (var y in query)
            {
                res.AppendFormat("<tr><td align=\"left\"><span>{0} - {1}</span><br/><a href='ymsgr:sendIM?{2}'><img vspace='5' hspace='5' border='0px' align='absmiddle' alt='Send us an instant message!' src='http://opi.yahoo.com/online?u={2}&w=20&m=g&t=2'></a></td></tr>", y.Name, y.Phone);
            }

            res.Append("</table>");

            return res.ToString();
        }
    }
}
